package com.zhu.service.cms.FeignService;

import com.zhu.commons.utils.R;
import com.zhu.service.cms.FeignService.FallBack.AliyunFallBack;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.multipart.MultipartFile;

@Service
@FeignClient(value = "aliyun-oss",fallback = AliyunFallBack.class)
public interface AliyunFeign {
    @ApiOperation(value = "文件上传")
    @PostMapping("upload")
    public R upload(@RequestParam("file") MultipartFile file);


    @ApiOperation(value = "文件删除")
    @DeleteMapping("/delete")
    public R DeleteFile(@RequestParam String fileName);
}
